package com.csd.exception;

public abstract class BaseException extends RuntimeException {
	private Throwable throwable;
	public BaseException(Throwable throwable,Object message)
	{	
		super(message.toString());
		this.throwable = throwable;
	}
	
	public Throwable getThrowable() {
		return throwable;
	}

	public BaseException(Throwable throwable)
	{	
		super(throwable);		
	}
	
	public BaseException(Object message)
	{
		super(message.toString());
	}
	
	@Override
	public void printStackTrace() {	
		super.printStackTrace();
		if(this.throwable != null)
			this.throwable.printStackTrace();
	}



	public enum saveException {
		a,b,c,d
	}
	
	public enum getException {
		a,b,c,d
	}
	
	public enum deleteException {
		a,b,c,d
	}
	public enum updateException {
		a,b,c,d
	}
	
	
}
